#import <UIKit/UIKit.h>
#import "ValueSelectorDelegate.h"
#import "SFUConstants.h"

/**
 * A ValueSelectorView is an object representing a generic temporary
 * view for selecting an entry from a list of values.
 *
 * @author      James Lin
 * @version     1.1.5
 * @since       1.1.3
 */
@interface ValueSelectorView : UITableViewController {
	id<ValueSelectorDelegate> delegate;     // Delegate handling events from this view
	UINavigationController*   parentNav;    // Navigation controller of parent view
	NSUInteger                identifier;   // Unique identifier for this view
	NSArray*                  cellText;     // List of value display text for the cells
	NSArray*                  cellValues;   // List of the values
	NSMutableArray*           cellSelected; // Tracked value selection(s)
}

@property (nonatomic, retain) NSArray* cellText;
@property (nonatomic, retain) NSArray* cellValues;
@property (nonatomic, retain) NSMutableArray* cellSelected;

/**
 * Initialize the value selector view.
 *
 * @param valueIndentifier  a unique identifier for this value selector view
 * @param values            a dictionary of values from which to select
 */
- (id)initWithIdentifier:(NSUInteger)valueIdentifier values:(NSDictionary*)values;

/**
 * Set the delegate handling events from this view.
 *
 * @param theDelegate  the delegate handling events from this view
 * @see                ValueSelectorDelegate
 */
- (void)setDelegate:(id<ValueSelectorDelegate>)theDelegate;

/**
 * Display the table listing of values in a new view.
 *
 * Pushes this view onto the navigation controller stack of the parent
 * view. Upon tapping the back button, the view is automatically 
 * popped off the top of the navigation stack.
 *
 * @param title          title of the temporary view
 * @param navController  the navigation controller of the parent view
 * @param selected       the value that is to be preselected
 */
- (void)displayViewWithTitle:(NSString*)title 
			   navController:(UINavigationController*)navController 
			   selectedValue:(id)selected;

@end
